#ifndef _CAMERA_H_
#define _CAMERA_H_

#include <glm/glm.hpp>


class Camera {
public:
	Camera(const glm::vec3& pos, float focal = 0.f);

	// Rotate camera about y-axis, angles are in radians.
	void rotateY(float angle);

	void setFocalLength(float fl) {
		_focal = fl;
	}
	float getFocalLength() const {
		return _focal;
	}

	// Move camera
	void transform(const glm::vec3& pos);

	// Get position in the world
	const glm::vec3 getWorldPos() const {
		return _worldPos;
	}

	const glm::mat3& getRotYMatrix() const {
		return _rotYMatrix;
	}

protected:
	glm::vec3 _localPos;
	glm::vec3 _worldPos;
	float _focal;
	glm::mat3 _rotYMatrix;
	float _yAngle;
};

#endif // _CAMERA_H_

